package com.dk.service.impl;

import com.alibaba.druid.util.StringUtils;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.dk.mapper.DicrecordMapper;
import com.dk.pojo.Dicrecord;
import com.dk.pojo.Tbcities;
import com.dk.service.RecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RecordServiceimpl implements RecordService {

    @Autowired
    private DicrecordMapper dicrecordMapper;
    @Override
    public Dicrecord getNumTime(Long id) {
        /*java8新特性 方法的引用*/
        LambdaQueryWrapper<Dicrecord> lambdaQueryWrapper = new LambdaQueryWrapper<>();
        LambdaQueryWrapper<Dicrecord> eq = lambdaQueryWrapper.eq(id>0,Dicrecord:: getCid, id);
        Dicrecord dicrecord = dicrecordMapper.selectOne(eq);
        return dicrecord;
    }
}

